/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.sql.Timestamp;

/**
* @website https://eladmin.vip
* @description /
* @author yyx
* @date 2024-11-08
**/
@Entity
@Data
@Table(name="info_review_information_log")
public class ReviewInformationLog implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "日志ID")
    private String id;

    @Column(name = "`review_id`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "审核id")
    private String reviewId;

    @Column(name = "`review_person_id`")
    @ApiModelProperty(value = "审核人ID")
    private String reviewPersonId;

    @Column(name = "`review_time`")
    @ApiModelProperty(value = "审核时间")
    private Timestamp reviewTime;

    @Column(name = "`review_stage`")
    @ApiModelProperty(value = "审核环节")
    private String reviewStage;

    @Column(name = "`review_result`")
    @ApiModelProperty(value = "操作结果")
    private String reviewResult;

    @Column(name = "`review_status`")
    @ApiModelProperty(value = "状态")
    private String reviewStatus;

    @Column(name = "`review_comments`")
    @ApiModelProperty(value = "操作意见/备注")
    private String reviewComments;

    @Column(name = "`review_num`")
    @ApiModelProperty(value = "审核次数")
    private Long reviewNum;

    @Column(name = "`gmt_create`")
    @ApiModelProperty(value = "创建时间")
    @CreationTimestamp
    private Timestamp gmtCreate;

    public void copy(ReviewInformationLog source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
